package com.hhl.service;

import com.spring.annotation.Component;
import com.spring.interfaces.InitializingBean;

/**
 * @desc:
 * @author: hhl
 * @date：2023/10/20 15:53
 */
//@Component("userService")
//@Scope("prototype")
public class UserService implements InitializingBean {

//    @Autowired
//    OrderService orderService;

    private String name;

//    private String beanName;
//    @Override
//    public void setBeanName(String name) {
//        beanName = name;
//    }


    public void setName(String name) {
        this.name = name;
    }

    public String getUser(){
//        System.out.println(orderService);

        return "hhl";
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        //验证什么属性是否为空
        System.out.println("初始化");
    }
}
